#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#define BIRD_ID 69
#define CHILD_BIRD_ID 96

#include "cocos2d.h"
#include "CEgg.h"
#include "Nests.h"
#include "CBird.h"
#include "CGameOverScene.h"
using namespace cocos2d;

class HelloWorld : public cocos2d::CCLayer
{
private:
	bool check;
	CCArray* nestsArray;
	CEgg* _egg;
	void updateGame(float dt);
	CCPoint middle;
	Nests* nests;
	CCSize visibleSize;
	CBird *birds;
	CCSprite* pFirstSpriteOfBird;
	CGameOverLayer *gameOverLayer ;
	int currentLayer;
	float start;
	float delta;
	bool shot;
public:

    virtual bool init();  

    static cocos2d::CCScene* scene();

	void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);

	void createNests();
	void addNetst(float y);
	void startNests();
	void stopNests();
	void moveallNest();
	void moveallNestDone();

	void showbonus();

	void keyBackClicked(void);
    void programExit(CCObject* pSender);

    CREATE_FUNC(HelloWorld);



};

#endif // __HELLOWORLD_SCENE_H__
